
export default {
  increment(state) {
    state.count++;
    // 只要修改数据就去本地存储保存一份
    localStorage.setItem("vuex-count",JSON.stringify(state))
  },

  incrementN(state, { n }) {
    state.count += n;
    localStorage.setItem("vuex-count",JSON.stringify(state))
  },
  decrement(state) {
    state.count--;
    localStorage.setItem("vuex-count",JSON.stringify(state))
  },
  setMovieList(state, movieList) {
    state.movieList = movieList;
    localStorage.setItem("vuex-count",JSON.stringify(state))
  },
};
